package cn.cs.mapper;

import cn.cs.pojo.UserBalance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserBalanceMapper {
	//根据userId查询账户余额信息
	public UserBalance getUserBalanceById(@Param(value = "userId") String userId)throws Exception;
	//根据userId更改账户余额
	public Integer updateBalance(Map<String, Object> map)throws Exception;

	public List<Map<String,Object>> getUserBalanceListByMap(Map<String, Object> param)throws Exception;

	public Integer getUserBalanceCountByMap(Map<String, Object> param)throws Exception;

	public Integer insertUserBalance(UserBalance userBalance)throws Exception;

	public Integer updateUserBalance(@Param(value = "balance") String balance, @Param(value = "id") String id)throws Exception;

	public Integer updateUserBalanceNew(@Param(value = "id") String id, @Param(value = "balance") String balance)throws Exception;

	public Integer deleteUserBalanceById(@Param(value = "id") Long id)throws Exception;

}
